#include "example_opengl_viewport.h"
#include <sxCamera_Archetype.h>
#include <sxOpenGL_DefaultCameraRenderer.h>

using Sx::String;
using Sx::OpenGL::Graphics::Contexts::OpenGL_Context;
using Sx::QtInterface::QOpenGL_Viewport;

Example_OpenGL_Viewport::Example_OpenGL_Viewport(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) {
	ui.setupUi(this);

	this->openglContext = std::make_shared<OpenGL_Context>();
	this->openglViewport = new QOpenGL_Viewport(this, this->openglContext);
}

Example_OpenGL_Viewport::~Example_OpenGL_Viewport() {}

void Example_OpenGL_Viewport::resizeEvent(QResizeEvent* e)  {
	this->openglViewport->resize(this->width(), this->height());
}
